public class Course {
    private String courseId;    // 课程编号
    private String courseName;  // 课程名称
    private String location;    // 上课地点
    private String time;        // 上课时间
    private Teacher teacher;    // 授课教师

    // 构造方法
    public Course(String courseId, String courseName, String location, String time) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.location = location;
        this.time = time;
    }

    // Getter 和 Setter 方法
    public String getCourseId() { return courseId; }
    public void setCourseId(String courseId) { this.courseId = courseId; }
    public String getCourseName() { return courseName; }
    public void setCourseName(String courseName) { this.courseName = courseName; }
    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }
    public String getTime() { return time; }
    public void setTime(String time) { this.time = time; }
    public Teacher getTeacher() { return teacher; }
    public void setTeacher(Teacher teacher) { this.teacher = teacher; }

    @Override
    public String toString() {
        return "课程编号: " + courseId + ", 课程名称: " + courseName + ", 上课地点: " + location + ", 上课时间: " + time + ", 授课教师: " + (teacher != null ? teacher.getName() : "暂无");
    }
}